home *** CD-ROM | disk | FTP | other *** search
- // mycloctl.h : Declaration of the CMyclockCtrl OLE control class.
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyclockCtrl : See mycloctl.cpp for implementation.
-
- class CMyclockCtrl : public COleControl
- {
- DECLARE_DYNCREATE(CMyclockCtrl)
-
- // Constructor
- public:
- CMyclockCtrl();
-
- // Overrides
-
- // Drawing function
- virtual void OnDraw(
- CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
-
- // Persistence
- virtual void DoPropExchange(CPropExchange* pPX);
-
- // Reset control state
- virtual void OnResetState();
-
- // Implementation
- protected:
- ~CMyclockCtrl();
-
- DECLARE_OLECREATE_EX(CMyclockCtrl) // Class factory and guid
- DECLARE_OLETYPELIB(CMyclockCtrl) // GetTypeInfo
- DECLARE_PROPPAGEIDS(CMyclockCtrl) // Property page IDs
- DECLARE_OLECTLTYPE(CMyclockCtrl) // Type name and misc status
-
- // Message maps
- //{{AFX_MSG(CMyclockCtrl)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnTimer(UINT nIDEvent);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- // Dispatch maps
- //{{AFX_DISPATCH(CMyclockCtrl)
- long m_updateInterval;
- afx_msg void OnUpdateIntervalChanged();
- afx_msg void Beep();
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
-
- afx_msg void AboutBox();
-
- // Event maps
- //{{AFX_EVENT(CMyclockCtrl)
- void FireNewMinute()
- {FireEvent(eventidNewMinute,EVENT_PARAM(VTS_NONE));}
- //}}AFX_EVENT
- DECLARE_EVENT_MAP()
-
- // Dispatch and event IDs
- public:
- enum {
- //{{AFX_DISP_ID(CMyclockCtrl)
- dispidUpdateInterval = 1L,
- dispidBeep = 2L,
- eventidNewMinute = 1L,
- //}}AFX_DISP_ID
- };
- };
-